package com.warm.dataobject;

import com.warm.enums.OrderStatusEnum;
import com.warm.enums.PayStatusEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by liangchuang on 2018/9/4.
 */
@Entity
@DynamicUpdate
@Data
public class OrderMaster {

    @Id
    private String orderId;
    private String buyerName;
    private String buyerPhone;
    private String buyerAddress;
    private String buyerOpenid;
    //
    private BigDecimal orderAmount;
    //0-新下单（默认）
    private Integer orderStatus = OrderStatusEnum.NEW.getCode();
    //0-未支付（默认）
    private Integer payStatus = PayStatusEnum.WAIT.getCode();
    private Date createTime;
    private Date updateTime;

    //@Transient
    //private List<OrderDetail> orderDetailList;

}
